package com.matriq.cloudmanager.dialog;

import com.matriq.cloudmanager.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import net.lgpage.dialog.BaseDialog;

public class UpdateNoticeDialog extends BaseDialog {

	public UpdateNoticeDialog(Context context) {
		super(context);
		onCreate();
	}

	View view;

	public void onCreate() {
		view = LayoutInflater.from(getContext()).inflate(R.layout.dg_update_notice,
				null);
		setViews();
		setEvents();
		loadData();
		setContentView(view);
	}

	@Override
	public void setTitle(CharSequence title) {
		tv_title.setText(title);
	}

	TextView tv_prompt;
	Button bt_cancel;
	Button bt_confirm;

	TextView tv_title;
	private void setViews() {
		tv_title = (TextView) view.findViewById(R.id.tv_title);
		tv_prompt = (TextView) view.findViewById(R.id.tv_prompt);
		bt_cancel = (Button) view.findViewById(R.id.bt_cancel);
		bt_confirm = (Button) view.findViewById(R.id.bt_confirm);
	}

	private void setEvents() {
		bt_cancel.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				cancel();
			}
		});
		bt_confirm.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				onExecute(null);
			}
		});
	}

	private void loadData() {

	}
	

	public Button getBt_cancel() {
		return bt_cancel;
	}

	public void setBt_cancel(Button bt_cancel) {
		this.bt_cancel = bt_cancel;
	}

	public Button getBt_confirm() {
		return bt_confirm;
	}

	public void setBt_confirm(Button bt_confirm) {
		this.bt_confirm = bt_confirm;
	}

	String obj;

	public void setData(String obj) {
		this.obj = obj;
		tv_prompt.setText(obj);
	}

}